package com.sdx.console.base.entity;

import java.util.Date;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Null;

import com.fasterxml.jackson.annotation.JsonIgnore;
import org.beetl.sql.core.annotatoin.ColumnIgnore;
import org.beetl.sql.core.annotatoin.AutoID;
import org.beetl.sql.core.annotatoin.SeqID;
import org.apache.commons.lang3.StringUtils;
import com.ibeetl.admin.core.util.ValidateConfig;
import com.sdx.service.ConfigService;

import org.beetl.sql.core.TailBean;
import java.math.*;

import com.ibeetl.admin.core.annotation.Dict;
import com.ibeetl.admin.core.entity.BaseEntity;

import org.beetl.sql.core.annotatoin.InsertIgnore;
import org.beetl.sql.core.annotatoin.Version;
import org.beetl.sql.core.annotatoin.LogicDelete;
import com.sdx.common.utils.Utils;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import lombok.Data;

/* 
* 
* gen by Spring Boot2 Admin 2019-04-16
*/
@JsonSerialize(include=JsonSerialize.Inclusion.NON_NULL)
@Data
public class BaseMessage extends BaseEntity{

    //唯一主键
    @NotNull(message = "ID不能为空", groups =ValidateConfig.UPDATE.class)
    @AutoID	
    private Long messageId ;
	
    //消息标题
    private String title ;
	
    //消息内容
    private String content ;
	
    //排序
    private Integer sort ;
	
    //跳转地址
    private String href ;
	
    //状态[0-下线 1- 新建 2-上线]
    private Integer status ;
	
    //来源,逗号隔开多个[14、公开课，15、圣达信教育，16、志愿填报，17、自主招生，18、艺考生]
    private String module ;
	
    //来源渠道 miniprogram、自有微信小程序，h5、自有h5，gaosan、高三网app，h6、高三网h5引流
    private String channelCode ;
	
    //小图
    private String img ;
	
    //消息类型[0-文本 1-图文 2-直播 3-小程序]
    private Integer type ;
	
    //消息发送日期，2018-12-28
    private String smsDate ;
	
    //创建时间
    private Date createdTime ;
	
    private Integer createdBy ;
	
    private String createdName ;
	
    private Integer updatedBy ;
	
    private String updatedName ;
	
    private Date updatedTime ;
	
	public String getImgView(){
		return Utils.imageUrl(img);
	}

	private String shareImg;

    public String getShareImgView(){
        return Utils.imageUrl(shareImg);
    }

    private Integer provinceId;

}
